import request from '@/utils/request'

// 查询长期工工资列表
export function listSalary(query) {
  return request({
    url: '/attendanceSalarySumApi/list',
    method: 'get',
    params: query
  })
}

export function listSalaryDetail(query) {
  return request({
    url: '/attendanceSalaryApi/list',
    method: 'get',
    params: query
  })
}
// 查询长期工工资详细
export function getSalary(id) {
  return request({
    url: '/attendanceSalaryApi/' + id,
    method: 'get'
  })
}

// 新增长期工工资
export function addSalary(data) {
  return request({
    url: '/attendanceSalaryApi',
    method: 'post',
    data: data
  })
}

// 修改长期工工资
export function updateSalary(data) {
  return request({
    url: '/attendanceSalaryApi',
    method: 'put',
    data: data
  })
}

// 删除长期工工资
export function delSalary(id) {
  return request({
    url: '/attendanceSalarySumApi/' + id,
    method: 'delete'
  })
}

// 导出长期工工资
export function exportSalary(query) {
  return request({
    url: '/attendanceSalaryApi/export',
    method: 'get',
    params: query
  })
}

// 生成工资单接口
export function saveSalary(data) {
  return request({
    url: '/attendanceSalaryApi/saveAttendanceSalary',
    method: 'post',
    data: data
  })
}
